<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="utf-8">

        function test() {
            //全局变量
            c = 5;
        }
        test();
        alert(c);
    </script>
</head>
<body>
</body>
</html>